using System;
using Core.Base;
using Core.Contracts.Enums;
using Core.Contracts.Interfaces;
using Core.Extensions;
using Core.Features;
using Core.Resources;

namespace Core.Items.Robots
{
    
    public sealed class CameleonMk2: RobotBase
    {
        /// <summary>
        /// Create a new instance of the <see cref="T:Core.Items.Robots.Cameleon"/> class.
        /// </summary>
        public CameleonMk2()
            : base(
            "Cameleon Mk2",
            Traduction.desc_cameleon,
            FactionsEnum.Nuimqol,
            RobotTechnologyLevel.Mk2,
            RobotSizesEnum.Light,
            new ISlot[]
                {
                    new Slot(0,SlotGroupsEnum.Chassis,SlotTypesEnum.Turret|SlotTypesEnum.Misc|SlotTypesEnum.Industrial, SizesEnum.Small),
                    new Slot(1,SlotGroupsEnum.Chassis,SlotTypesEnum.Turret|SlotTypesEnum.Misc|SlotTypesEnum.Industrial, SizesEnum.Small),
                    new Slot(2,SlotGroupsEnum.Chassis,SlotTypesEnum.Misc, SizesEnum.Small|SizesEnum.Medium),
                    new Slot(SlotGroupsEnum.Head, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Head, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Head, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Head, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Head, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Legs, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Legs, SlotTypesEnum.Modules),
                    new Slot(SlotGroupsEnum.Legs, SlotTypesEnum.Modules)
                },
            new IFeature<object>[]
                {
                    new AccumulatorCapacity<double>(300),
                    new AccumulatorRechargeTime<double>(120),
                    new CpuPerformance<double>(260),
                    new ReactorPerformance<double>(160),
                    new ArmorAmount<double>(550),
                    new ChemicalResistance<double>(30),
                    new KineticResistance<double>(45),
                    new SeismicResistance<double>(150),
                    new ThermalResistance<double>(10),
                    new SurfaceHitSize<double>(2.75),
                    new InterferenceEmission<double>(5),
                    new InterferenceMinimum<double>(100),
                    new InterferencePeak<double>(350),
                    new InterferenceRadius<double>(100),
                    new LockingRange<double>(300),
                    new LockingTime<double>(12.50),
                    new MaximumTargets<double>(6),
                    new MissileGuidanceFailure<double>(0.1),
                    new SensorStrength<double>(100),
                    new SignalDetection<double>(70),
                    new SignalMasking<double>(130),
                    new ReloadingTime<double>(10),
                    new CargoCapacity<double>(3),
                    new RobotMass<double>(4950),
                    new SlopeCapacity<double>(56),
                    new TopSpeed<double>(70.20),
                    new Volume<double>(10),
                    new DemobilizerResistance<double>(0),
                    new CriticalHitChance<double>(0)
                },
            new IBonusModifier[]
                {
                    new BonusModifier<BasicRobotics>( FeatureTypesEnum.Module, FeaturesEnum.ElectronicWarfareStrength, 0.05){ Unit = UnitsEnum.Percentage, DisplayName = "EW Strength"}, 
                    new BonusModifier<BasicRobotics>( FeatureTypesEnum.Module, FeaturesEnum.EcmAccumulatorUsage, -0.05){ Unit = UnitsEnum.Percentage, DisplayName = "ECM Accumulator usage"}, 
                    new BonusModifier<BasicRobotics>( FeatureTypesEnum.Module, FeaturesEnum.SensorSuppressorAccumulatorUsage, -0.05){ Unit = UnitsEnum.Percentage, DisplayName = "Sensor suppressor accumulator usage"}, 
                    new BonusModifier<BasicRobotics>( FeatureTypesEnum.Module, FeaturesEnum.DemobilizerAccumulatorUsage, -0.05){ Unit = UnitsEnum.Percentage, DisplayName = "Demobilizer accumulator usage"}, 
                    new BonusModifier<BasicRobotics>( FeatureTypesEnum.Module, FeaturesEnum.ArmorRepairAmount, 0.05){ Unit = UnitsEnum.Percentage, DisplayName = "Armor repair amount"}, 

                    new BonusModifier<SpecOpsRobotControl>( FeatureTypesEnum.Module, FeaturesEnum.SensorSuppressorOptimal, 0.02){ Unit = UnitsEnum.Percentage, DisplayName = "Sensor suppressor optimal range"}, 
                    new BonusModifier<SpecOpsRobotControl>( FeatureTypesEnum.Module, FeaturesEnum.EcmOptimal, 0.02){ Unit = UnitsEnum.Percentage, DisplayName = "ECM optimal range"}, 
                    new BonusModifier<SpecOpsRobotControl>( FeatureTypesEnum.Module, FeaturesEnum.DemobilizerOptimal, 0.02){ Unit = UnitsEnum.Percentage, DisplayName = "Demobilizer optimal range"}, 

                },
            new ICondition<IExtension>[]
                {
                    new ExtensionCondition<BasicRobotics>(3),
                    new ExtensionCondition<NuimqolRobotControl>(3), 
                    new ExtensionCondition<SpecOpsRobotControl>(1),
                })
        {
        }
        
    }
}